<template>
  <el-card shadow="always">
    <h3>筛选条件</h3>
    <el-form :model="filters" label-width="80px">
      <el-form-item label="涨幅 (%)">
        <el-input-number v-model="filters.changePercent" :min="0" :max="20" />
      </el-form-item>
      <el-form-item label="成交量 (万)">
        <el-input-number v-model="filters.volume" :min="0" :step="100" />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="applyFilters">应用筛选</el-button>
      </el-form-item>
    </el-form>
  </el-card>
</template>

<script setup>
import { reactive, defineEmits } from 'vue'
const emit = defineEmits(['apply-filters'])

const filters = reactive({
  changePercent: 5,
  volume: 1000,
})

const applyFilters = () => {
  emit('apply-filters', filters)
}
</script>
